<template>
  <div>
    <h1>关于</h1>
    <h2>消息: {{msg}}</h2>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "没有消息--",
    };
  },
  created() {
    // mounted() {
    let that = this;
    this.$eventBus.$on("send-msg", function (msg) {
      console.log("接收到了传递过来的数据 ", msg);
      // console.log(this === that);
      that.msg = msg;
      // console.log(this);
    });
  },
};
</script>

<style>
</style>